package com.fzkj;

import com.fzkj.service.UserService;
import org.fzkj.rpc.core.client.RPCClient;

import java.net.InetSocketAddress;

/**
 * 服务消费者，使用rpc框架中提供的服务
 *
 */
public class App {
    public static void main( String[] args ) {
        // 在客户端调用rpc框架
        UserService userService = RPCClient.getRemoteProxy(UserService.class,
                new InetSocketAddress("127.0.0.1", 2323));
        String result = userService.addUser("杨明梅");
        System.out.println(result);
    }
}
